import requests
import ddddocr


def ocr_from_file(file_path):
    with open(file_path, 'rb') as f:
        img_bytes = f.read()
        ocr = ddddocr.DdddOcr()
        res = ocr.classification(img_bytes)
        return res
